<link rel="stylesheet" href="/assets/home/css/center.css">
<link rel="stylesheet" href="/assets/home/css/avatar.css">

<style>
    .none {
        display: none;
    }
</style>

<div class="top_div">
    <div class="userInfo">
        <!-- /assets/home/images/avatar.jpg -->
        <img class="upic" src="{$LoginAuth['avatar_cdn']}" />
        <p class="uBalance">{$LoginAuth['nickname'] ? $LoginAuth['nickname'] : $LoginAuth['mobile_text'] }</p>
    </div>
</div>

<ul class="mui-table-view">
    <li class="mui-table-view-cell">
        <a class="mui-navigate-right" href="{:url('home/business/profile')}"><span
                class="mui-icon mui-icon-person"></span>我的资料</a>
    </li>
    <li class="mui-table-view-cell">
        <a class="mui-navigate-right" href="{:url('/home/subject/order/index')}"><span
                class="mui-icon mui-icon-compose"></span>我的订单</a>
    </li>
    <li class="mui-table-view-cell {$LoginAuth['auth'] == 1 ? 'none' : ''}">
        <a class="mui-navigate-right" href="{:url('/home/business/email')}"><span
                class="mui-icon mui-icon-compose"></span>邮箱认证</a>
    </li>
    <li class="mui-table-view-cell">
        <a class="mui-navigate-right" href="{:url('/home/recharge')}"><span class="mui-icon mui-icon-list"></span>充值</a>
    </li>
    <li class="mui-table-view-cell">
        <a class="mui-navigate-right" href="{:url('/home/index/contact')}"><span
                class="mui-icon mui-icon-chatboxes"></span>联系我们</a>
    </li>
    <li class="mui-table-view-cell">
        <a class="mui-navigate-right" id="logout"><span class="mui-icon mui-icon-loop"></span>退出登录</a>
    </li>
</ul>

{include file='common/footer'/}

<script>
    // 退出登录
    $('#logout').click(function () {
        mui.confirm('是否确认退出？', '退出', function (e) {
            if (e.index == 1) {
                location.href = `{:url('home/index/logout')}`
            }
        })
    })
    $.ajax({
        type: 'get',
        url: ``,
        data: {
            // email: email,
            // busid: `{$LoginAuth['id']}`
        },
        dataType: 'json',
        success: function (res) {
            // console.log(res);
            // if (res.code === 1) {
            //     mui.toast(res.msg)
            // } else {
            //     mui.toast(res.msg)
            // }
        }
    })
</script>